
function drugDisplayEditAndDeleteBtn(val){
    var html = '<a href="#" onClick="openEditDrugItemDialog(' + val + ');">แก้ไข</a>&nbsp;';
    html += '<a href="#" onClick="checkDrugItemToDelete(' + val + ');">ลบ</a>&nbsp;';
    return html;
}

function drugLotDisplayEditAndDeleteBtn(val){
    var html = '<a href="#" onClick="openEditDrugLotDialog(' + val + ');">แก้ไข</a>&nbsp;';
    html += '<a href="#" onClick="checkDrugLotToDelete(' + val + ');">ลบ</a>&nbsp;';
    return html;
}

function drugLotItemDisplayDeleteBtn(val){
    var html = '';
    html += '<a href="#" onClick="deleteDrugLotItem(' + val + ');">ลบ</a>&nbsp;';
    return html;
}

function dateFormatter(val){
    val = val.split('|');
    if(val.length == 1){
        return val;
    }
    return val[1];
}